package com.dongdong.tbbrandService.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdong.mapper.TbGoodsDescMapper;
import com.dongdong.mapper.TbGoodsMapper;
import com.dongdong.pojo.TbGoods;
import com.dongdong.pojo.TbGoodsDesc;
import com.dongdong.service.TbGoodsDescService;
import org.springframework.beans.factory.annotation.Autowired;

@Service
@org.springframework.stereotype.Service
public class TbGoodsDescImpl implements TbGoodsDescService {
    @Autowired
    private TbGoodsDescMapper tbGoodsDescMapper;
    @Autowired
    private TbGoodsMapper tbGoodsMapper;
    @Override
    public void addInfo(TbGoodsDesc tbGoodsDesc, TbGoods tbGoods) {
        tbGoodsMapper.insertSelective(tbGoods);
        Long id = tbGoods.getId();
        tbGoodsDesc.setGoodsId(id);
        tbGoodsDescMapper.insertSelective(tbGoodsDesc);
    }
}
